# 查找诗人

f1=open("sy5//唐诗.txt","r")
x=input("输入作者")

n = 0
for line in f1:
    line = line.strip("\n")
    colonIndex = line.find(":")
    author = line[3:colonIndex]
    if author == x:
        n += 1
        print(line)
if n == 0:
    print("无作品")
else:
    print("作品数 {}".format(n))